<head>
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">  
</head>
{literal}
<style type="text/css">
body {
	font-family: Arial, '宋体';
	margin: 0 auto;
	padding: 0;
	background: url(./static/public/jcrop/images/bg.jpg) repeat;
	font-size: 12px;
	color: #000;
}

.container {
	width: 800px;
	margin: 0px auto;
}

.section {
	background-color: #fff;
	padding: 20px;
}

.row {
	width: 661px;
	overflow: hidden;
	margin-top: 20px;
	line-height: 30px;
	padding-left: 94px;
}

.row span.label {
	float: left;
	position: relative;
	line-height: 30px;
	margin-left: -94px;
	width: 84px;
	text-align: right;
	color: #5b5b5b;
}

.btn_submit {
	background: url(./static/public/jcrop/images/submit.gif) no-repeat;
	width: 70px;
	height: 29px;
	border: 0;
}
</style>
{/literal}


<div style="width: 400px; float: left;">
<div class="row"><label><span class="label">上传头像：</span></label> <img
	src="" id="target" width="360px;"/><div class="jianyi">要求：必须为本人的真实头像，图像清晰</div></div>
<div class="row" style="float: left; width: 400px;"><label><span
	class="label">上传：</span></label> <input type="text" id="avatarUpload"
	value="" /> <input type="hidden" id="img" name="img" /> <input
	type="hidden" id="x" name="x" /> <input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" /> <input type="hidden" id="h"
	name="h" /></div>

</div>



<script src="./static/public/jcrop/jquery.js"></script>
<link href="./static/public/uploadify/uploadify.css" type="text/css"
	rel="stylesheet" />
<script type="text/javascript"
	src="./static/public/uploadify/jquery.uploadify-3.1.js"></script>
<script type="text/javascript"
	src="./static/public/jcrop/jquery.Jcrop.min.js"></script>
<link rel="stylesheet" href="./static/public/jcrop/jquery.Jcrop.css"
	type="text/css" />
{literal}
<script type="text/javascript">
$(function() {
	//首页轮播图1
	$("#avatarUpload").uploadify({
		'auto'				: true,
		'multi'				: false,
		'uploadLimit'		: 10,
		'formData'			: {'uid':{/literal}{$user.uid}{literal}},
		'buttonText'		: '请选择头像',
		'height'			: 20,
		'width'				: 120,
		'fileObjName':'face',
		'removeCompleted'	: true,
		'swf'				: './static/public/uploadify/uploadify.swf',
		'uploader'			: './index.php?face/setface',
		'fileTypeExts'		: '*.gif; *.jpg; *.jpeg; *.png;',
		'fileSizeLimit'		: '800KB',
		'onUploadSuccess' : function(file, data, response) {
			var msg = $.parseJSON(data);
		   alert("头像上传成功,请等待审核!");
		},
		
    });
    
    
});
</script>
{/literal}
</body>
</html>